<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Tweener.as</title>
<link rel="stylesheet" type="text/css" href="../../../SourceStyles.css"/>
</head>

<body><pre><span class="ActionScriptASDoc">/**
 * Tweener
 * Transition controller for movieclips, sounds, textfields and other objects
 *
 * @author        Zeh Fernando, Nate Chatellier, Arthur Debert
 * @version        1.26.62
 */</span>

<span class="ActionScriptComment">/*
Licensed under the MIT License

Copyright (c) 2006-2007 Zeh Fernando and Nate Chatellier

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the &quot;Software&quot;), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://code.google.com/p/tweener/
http://code.google.com/p/tweener/wiki/License
*/</span>

<span class="ActionScriptpackage">package</span> <span class="ActionScriptDefault_Text">caurina</span>.<span class="ActionScriptDefault_Text">transitions</span> <span class="ActionScriptBracket/Brace">{</span>
    
    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">flash</span>.<span class="ActionScriptDefault_Text">display</span>.<span class="ActionScriptOperator">*</span>;
    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">flash</span>.<span class="ActionScriptDefault_Text">events</span>.<span class="ActionScriptDefault_Text">Event</span>;
    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">flash</span>.<span class="ActionScriptDefault_Text">utils</span>.<span class="ActionScriptDefault_Text">getTimer</span>;

    <span class="ActionScriptReserved">public</span> <span class="ActionScriptclass">class</span> <span class="ActionScriptDefault_Text">Tweener</span> <span class="ActionScriptBracket/Brace">{</span>
    
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">__tweener_controller__</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">MovieClip</span>;    <span class="ActionScriptComment">// Used to ensure the stage copy is always accessible (garbage collection)
</span>        
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_engineExists</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;        <span class="ActionScriptComment">// Whether or not the engine is currently running
</span>        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;                <span class="ActionScriptComment">// Whether or not the class has been initiated
</span>        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_currentTime</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                    <span class="ActionScriptComment">// The current time. This is generic for all tweenings for a &quot;time grid&quot; based update
</span>    
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span>;                    <span class="ActionScriptComment">// List of active tweens
</span>    
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> 1;                <span class="ActionScriptComment">// Time scale (default = 1)
</span>    
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;                <span class="ActionScriptComment">// List of &quot;pre-fetched&quot; transition functions
</span>        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;            <span class="ActionScriptComment">// List of special properties
</span>        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_specialPropertyModifierList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;    <span class="ActionScriptComment">// List of special property modifiers
</span>        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_specialPropertySplitterList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;    <span class="ActionScriptComment">// List of special property splitters
</span>
    
        <span class="ActionScriptASDoc">/**
         * There&apos;s no constructor.
         * @private
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">Tweener</span> <span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScripttrace">trace</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&quot;Tweener is a static class and should not be instantiated.&quot;</span><span class="ActionScriptBracket/Brace">)</span>
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptComment">// ==================================================================================================================================
</span>        <span class="ActionScriptComment">// TWEENING CONTROL functions -------------------------------------------------------------------------------------------------------
</span>
        <span class="ActionScriptASDoc">/**
         * Adds a new tweening.
         *
         * @param        (first-n param)        Object                Object that should be tweened: a movieclip, textfield, etc.. OR an array of objects
         * @param        (last param)        Object                Object containing the specified parameters in any order, as well as the properties that should be tweened and their values
         * @param        .time                Number                Time in seconds or frames for the tweening to take (defaults 2)
         * @param        .delay                Number                Delay time (defaults 0)
         * @param        .useFrames            Boolean                Whether to use frames instead of seconds for time control (defaults false)
         * @param        .transition            String/Function        Type of transition equation... (defaults to &quot;easeoutexpo&quot;)
         * @param        .onStart            Function            * Direct property, See the TweenListObj class
         * @param        .onUpdate            Function            * Direct property, See the TweenListObj class
         * @param        .onComplete            Function            * Direct property, See the TweenListObj class
         * @param        .onOverwrite        Function            * Direct property, See the TweenListObj class
         * @param        .onStartParams        Array                * Direct property, See the TweenListObj class
         * @param        .onUpdateParams        Array                * Direct property, See the TweenListObj class
         * @param        .onCompleteParams    Array                * Direct property, See the TweenListObj class
         * @param        .onOverwriteParams    Array                * Direct property, See the TweenListObj class
         * @param        .rounded            Boolean                * Direct property, See the TweenListObj class
         * @param        .skipUpdates        Number                * Direct property, See the TweenListObj class
         * @return                            Boolean                TRUE if the tween was successfully added, FALSE if otherwise
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">addTween</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_arg1</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>, <span class="ActionScriptDefault_Text">p_arg2</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">&lt;</span> 2 <span class="ActionScriptOperator">||</span> <span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rScopes</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>; <span class="ActionScriptComment">// List of objects to tween
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">j</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">jstr</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>;
    
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// The first argument is an array
</span>                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">][</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// The first argument(s) is(are) object(s)
</span>                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptComment">// rScopes = arguments.concat().splice(1); // Alternate (should be tested for speed later)
</span>    
            <span class="ActionScriptComment">// make properties chain (&quot;inheritance&quot;)
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">TweenListObj</span>.<span class="ActionScriptDefault_Text">makePropertiesChain</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">])</span>;
    
            <span class="ActionScriptComment">// Creates the main engine if it isn&apos;t active
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_engineExists</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">__tweener_controller__</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">startEngine</span><span class="ActionScriptBracket/Brace">()</span>; <span class="ActionScriptComment">// Quick fix for Flash not resetting the vars on double ctrl+enter...
</span>    
            <span class="ActionScriptComment">// Creates a &quot;safer&quot;, more strict tweening object
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rTime</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">time</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">?</span> 0 <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">time</span><span class="ActionScriptBracket/Brace">)</span>; <span class="ActionScriptComment">// Real time
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rDelay</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">delay</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">?</span> 0 <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">delay</span><span class="ActionScriptBracket/Brace">)</span>; <span class="ActionScriptComment">// Real delay
</span>    
            <span class="ActionScriptComment">// Creates the property list; everything that isn&apos;t a hardcoded variable
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>; <span class="ActionScriptComment">// array containing object { .name, .valueStart, .valueComplete }
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">restrictedWords</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">time</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">delay</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">useFrames</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">skipUpdates</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">transition</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onStart</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onUpdate</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onComplete</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onOverwrite</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">rounded</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onStartParams</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onUpdateParams</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onCompleteParams</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span>, <span class="ActionScriptDefault_Text">onOverwriteParams</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">}</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">modifiedProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">istr</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">restrictedWords</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// It&apos;s an additional pair, so adds
</span>                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertySplitterList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// Special property splitter
</span>                        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">splitProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_specialPropertySplitterList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">splitValues</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptDefault_Text">_specialPropertySplitterList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">splitProperties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">splitProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">valueStart</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">undefined</span>, <span class="ActionScriptDefault_Text">valueComplete</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">splitProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">value</span><span class="ActionScriptBracket/Brace">}</span>;
                        <span class="ActionScriptBracket/Brace">}</span>
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertyModifierList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// Special property modifier
</span>                        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tempModifiedProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_specialPropertyModifierList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifyValues</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">])</span>;
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">tempModifiedProperties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptDefault_Text">modifiedProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">tempModifiedProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">modifierParameters</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">tempModifiedProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span>, <span class="ActionScriptDefault_Text">modifierFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">_specialPropertyModifierList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">getValue</span><span class="ActionScriptBracket/Brace">}</span>;
                        <span class="ActionScriptBracket/Brace">}</span>
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// Regular property or special property, just add the property normally
</span>                        <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">valueStart</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">undefined</span>, <span class="ActionScriptDefault_Text">valueComplete</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]}</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
    
            <span class="ActionScriptComment">// Adds the modifiers to the list of properties
</span>            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">istr</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">modifiedProperties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierParameters</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">modifiedProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierParameters</span>;
                    <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierFunction</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">modifiedProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierFunction</span>;
                <span class="ActionScriptBracket/Brace">}</span>
                
            <span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rTransition</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>; <span class="ActionScriptComment">// Real transition
</span>    
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">typeof</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">&quot;string&quot;</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// String parameter, transition names
</span>                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">trans</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span>.<span class="ActionScriptDefault_Text">toLowerCase</span><span class="ActionScriptBracket/Brace">()</span>;
                <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">trans</span><span class="ActionScriptBracket/Brace">]</span>;
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Proper transition function
</span>                <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTransition</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptString">&quot;easeoutexpo&quot;</span><span class="ActionScriptBracket/Brace">]</span>;
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">nProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">nTween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;
    
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Makes a copy of the properties
</span>                <span class="ActionScriptDefault_Text">nProperties</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">istr</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">nProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">PropertyInfoObj</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">valueStart</span>, <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">valueComplete</span>, <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierFunction</span>, <span class="ActionScriptDefault_Text">rProperties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">istr</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">modifierParameters</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
                
                <span class="ActionScriptDefault_Text">nTween</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">TweenListObj</span><span class="ActionScriptBracket/Brace">(</span>
                    <span class="ActionScriptComment">/* scope            */</span>    <span class="ActionScriptDefault_Text">rScopes</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>,
                    <span class="ActionScriptComment">/* timeStart        */</span>    <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* timeComplete        */</span>    <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">(((</span><span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTime</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* useFrames        */</span>    <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">useFrames</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* transition        */</span>    <span class="ActionScriptDefault_Text">rTransition</span>
                <span class="ActionScriptBracket/Brace">)</span>;
                
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">properties</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">nProperties</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onStart</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onStart</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onUpdate</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onUpdate</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onComplete</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onComplete</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onOverwrite</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onOverwrite</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onError</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onError</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onStartParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onStartParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onCompleteParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onCompleteParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onOverwriteParams</span>    <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onOverwriteParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">rounded</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">rounded</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">skipUpdates</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">skipUpdates</span>;

                <span class="ActionScriptComment">// Remove other tweenings that occur at the same time
</span>                <span class="ActionScriptDefault_Text">removeTweensByTime</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">properties</span>, <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">timeStart</span>, <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">timeComplete</span><span class="ActionScriptBracket/Brace">)</span>;
    
                <span class="ActionScriptComment">// And finally adds it to the list
</span>                <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">nTween</span><span class="ActionScriptBracket/Brace">)</span>;
    
                <span class="ActionScriptComment">// Immediate update and removal if it&apos;s an immediate tween -- if not deleted, it executes at the end of this frame execution
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTime</span> <span class="ActionScriptOperator">==</span> 0 <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">==</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">myT</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1;
                    <span class="ActionScriptDefault_Text">updateTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
    
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptComment">// A &quot;caller&quot; is like this: [          |     |  | ||] got it? :)
</span>        <span class="ActionScriptComment">// this function is crap - should be fixed later/extend on addTween()
</span>    
        <span class="ActionScriptASDoc">/**
         * Adds a new caller tweening.
         *
         * @param        (first-n param)        Object that should be tweened: a movieclip, textfield, etc.. OR an array of objects
         * @param        (last param)        Object containing the specified parameters in any order, as well as the properties that should be tweened and their values
         * @param        .time                Number                Time in seconds or frames for the tweening to take (defaults 2)
         * @param        .delay                Number                Delay time (defaults 0)
         * @param        .count                Number                Number of times this caller should be called
         * @param        .transition            String/Function        Type of transition equation... (defaults to &quot;easeoutexpo&quot;)
         * @param        .onStart            Function            Event called when tween starts
         * @param        .onUpdate            Function            Event called when tween updates
         * @param        .onComplete            Function            Event called when tween ends
         * @param        .waitFrames            Boolean                Whether to wait (or not) one frame for each call
         * @return                            &lt;code&gt;true&lt;/code&gt; if the tween was successfully added, &lt;code&gt;false&lt;/code&gt; if otherwise.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">addCaller</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_arg1</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>, <span class="ActionScriptDefault_Text">p_arg2</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">&lt;</span> 2 <span class="ActionScriptOperator">||</span> <span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rScopes</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>; <span class="ActionScriptComment">// List of objects to tween
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">j</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;
    
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// The first argument is an array
</span>                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">][</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// The first argument(s) is(are) object(s)
</span>                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptComment">// rScopes = arguments.concat().splice(1); // Alternate (should be tested for speed later)
</span>    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">arguments</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">arguments</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1<span class="ActionScriptBracket/Brace">]</span>;
    
            <span class="ActionScriptComment">// Creates the main engine if it isn&apos;t active
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_engineExists</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">__tweener_controller__</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">startEngine</span><span class="ActionScriptBracket/Brace">()</span>; <span class="ActionScriptComment">// Quick fix for Flash not resetting the vars on double ctrl+enter...
</span>    
            <span class="ActionScriptComment">// Creates a &quot;safer&quot;, more strict tweening object
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rTime</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">time</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">?</span> 0 <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">time</span><span class="ActionScriptBracket/Brace">)</span>; <span class="ActionScriptComment">// Real time
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rDelay</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">delay</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">?</span> 0 <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">delay</span><span class="ActionScriptBracket/Brace">)</span>; <span class="ActionScriptComment">// Real delay
</span>    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rTransition</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>; <span class="ActionScriptComment">// Real transition
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">typeof</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">&quot;string&quot;</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// String parameter, transition names
</span>                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">trans</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span>.<span class="ActionScriptDefault_Text">toLowerCase</span><span class="ActionScriptBracket/Brace">()</span>;
                <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">trans</span><span class="ActionScriptBracket/Brace">]</span>;
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Proper transition function
</span>                <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">transition</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTransition</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">rTransition</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptString">&quot;easeoutexpo&quot;</span><span class="ActionScriptBracket/Brace">]</span>;
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">nTween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">rScopes</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                
                <span class="ActionScriptDefault_Text">nTween</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">TweenListObj</span><span class="ActionScriptBracket/Brace">(</span>
                    <span class="ActionScriptComment">/* Scope            */</span>    <span class="ActionScriptDefault_Text">rScopes</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>,
                    <span class="ActionScriptComment">/* TimeStart        */</span>    <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* TimeComplete        */</span>    <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">(((</span><span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTime</span> <span class="ActionScriptOperator">*</span> 1000<span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* UseFrames        */</span>    <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">useFrames</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">)</span>,
                    <span class="ActionScriptComment">/* Transition        */</span>    <span class="ActionScriptDefault_Text">rTransition</span>
                <span class="ActionScriptBracket/Brace">)</span>;

                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">properties</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptReserved">null</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onStart</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onStart</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onUpdate</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onUpdate</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onComplete</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onComplete</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onOverwrite</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onOverwrite</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onStartParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onStartParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onCompleteParams</span>        <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onCompleteParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">onOverwriteParams</span>    <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">onOverwriteParams</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">isCaller</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptReserved">true</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">count</span>                <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">count</span>;
                <span class="ActionScriptDefault_Text">nTween</span>.<span class="ActionScriptDefault_Text">waitFrames</span>            <span class="ActionScriptOperator">=</span>    <span class="ActionScriptDefault_Text">p_obj</span>.<span class="ActionScriptDefault_Text">waitFrames</span>;

                <span class="ActionScriptComment">// And finally adds it to the list
</span>                <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">nTween</span><span class="ActionScriptBracket/Brace">)</span>;
    
                <span class="ActionScriptComment">// Immediate update and removal if it&apos;s an immediate tween -- if not deleted, it executes at the end of this frame execution
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">rTime</span> <span class="ActionScriptOperator">==</span> 0 <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">rDelay</span> <span class="ActionScriptOperator">==</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">myT</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptOperator">-</span>1;
                    <span class="ActionScriptDefault_Text">updateTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">myT</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
    
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Remove an specified tweening of a specified object the tweening list, if it conflicts with the given time.
         *
         * @param        p_scope                Object                        List of objects affected
         * @param        p_properties        Object                         List of properties affected (PropertyInfoObj instances)
         * @param        p_timeStart            Number                        Time when the new tween starts
         * @param        p_timeComplete        Number                        Time when the new tween ends
         * @return                            Boolean                        Whether or not it actually deleted something
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">removeTweensByTime</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">p_timeStart</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">p_timeComplete</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">removed</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">removedLocally</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span>;
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tl</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>;

            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">tl</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">p_scope</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Same object...
</span>                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_timeComplete</span> <span class="ActionScriptOperator">&gt;</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeStart</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">p_timeStart</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeComplete</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// New time should override the old one...
</span>                        <span class="ActionScriptDefault_Text">removedLocally</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]))</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptComment">// Same object, same property
</span>                                <span class="ActionScriptComment">// Finally, remove this old tweening and use the new one
</span>                                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">onOverwrite</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                                    <span class="ActionScriptReserved">try</span> <span class="ActionScriptBracket/Brace">{</span>
                                        <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">onOverwrite</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">onOverwriteParams</span><span class="ActionScriptBracket/Brace">)</span>;
                                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">catch</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                        <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptDefault_Text">e</span>, <span class="ActionScriptString">&quot;onOverwrite&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                                    <span class="ActionScriptBracket/Brace">}</span>
                                <span class="ActionScriptBracket/Brace">}</span>
                                <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">undefined</span>;
                                <span class="ActionScriptReserved">delete</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>;
                                <span class="ActionScriptDefault_Text">removedLocally</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                                <span class="ActionScriptDefault_Text">removed</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">removedLocally</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptComment">// Verify if this can be deleted
</span>                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(A</span><span class="ActionScriptDefault_Text">uxFunctions</span>.<span class="ActionScriptDefault_Text">getObjectLength</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">==</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptBracket/Brace">}</span>
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">removed</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Remove tweenings from a given object from the tweening list.
         *
         * @param        p_tween                Object        Object that must have its tweens removed
         * @param        (2nd-last params)    Object        Property(ies) that must be removed
         * @return                            Boolean        Whether or not it successfully removed this tweening
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">removeTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, ...<span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptComment">// Create the property list
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">args</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">typeof</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">&quot;string&quot;</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">AuxFunctions</span>.<span class="ActionScriptDefault_Text">isInArray</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">properties</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptComment">// Call the affect function on the specified properties
</span>            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">affectTweens</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">removeTweenByIndex</span>, <span class="ActionScriptDefault_Text">p_scope</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span>;
        <span class="ActionScriptBracket/Brace">}</span>


        <span class="ActionScriptASDoc">/**
         * Remove all tweenings from the engine.
         *
         * @return                    &lt;code&gt;true&lt;/code&gt; if it successfully removed any tweening, &lt;code&gt;false&lt;/code&gt; if otherwise.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">removeAllTweens</span> <span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">removed</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">removed</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">removed</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Pause tweenings for a given object.
         *
         * @param        p_scope                Object that must have its tweens paused
         * @param        (2nd-last params)    Property(ies) that must be paused
         * @return                    &lt;code&gt;true&lt;/code&gt; if it successfully paused any tweening, &lt;code&gt;false&lt;/code&gt; if otherwise.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">pauseTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, ...<span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptComment">// Create the property list
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">args</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">typeof</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">&quot;string&quot;</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">AuxFunctions</span>.<span class="ActionScriptDefault_Text">isInArray</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">properties</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptComment">// Call the affect function on the specified properties
</span>            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">affectTweens</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pauseTweenByIndex</span>, <span class="ActionScriptDefault_Text">p_scope</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Pause all tweenings on the engine.
         *
         * @return                    &lt;code&gt;true&lt;/code&gt; if it successfully paused any tweening, &lt;code&gt;false&lt;/code&gt; if otherwise.
         * @see #resumeAllTweens()
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">pauseAllTweens</span> <span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">paused</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">pauseTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">paused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">paused</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Resume tweenings from a given object.
         *
         * @param        p_scope                Object        Object that must have its tweens resumed
         * @param        (2nd-last params)    Object        Property(ies) that must be resumed
         * @return                            Boolean        Whether or not it successfully resumed something
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">resumeTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, ...<span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptComment">// Create the property list
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">args</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">typeof</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">&quot;string&quot;</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">AuxFunctions</span>.<span class="ActionScriptDefault_Text">isInArray</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">properties</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">args</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">])</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptComment">// Call the affect function on the specified properties
</span>            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">affectTweens</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">resumeTweenByIndex</span>, <span class="ActionScriptDefault_Text">p_scope</span>, <span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Resume all tweenings on the engine.
         *
         * @return &lt;code&gt;true&lt;/code&gt; if it successfully resumed any tweening, &lt;code&gt;false&lt;/code&gt; if otherwise.
         * @see #pauseAllTweens()
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">resumeAllTweens</span> <span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">resumed</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">resumeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">resumed</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">resumed</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Do some generic action on specific tweenings (pause, resume, remove, more?)
         *
         * @param        p_function            Function    Function to run on the tweenings that match
         * @param        p_scope                Object        Object that must have its tweens affected by the function
         * @param        p_properties        Array        Array of strings that must be affected
         * @return                            Boolean        Whether or not it successfully affected something
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">affectTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_affectFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>, <span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">affected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;

            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;

            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_properties</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">==</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// Can affect everything
</span>                        <span class="ActionScriptDefault_Text">p_affectFunction</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptDefault_Text">affected</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// Must check whether this tween must have specific properties affected
</span>                        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">affectedProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
                        <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">j</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">j</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">j</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">p_properties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">j</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">j</span><span class="ActionScriptBracket/Brace">]]))</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">affectedProperties</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">j</span><span class="ActionScriptBracket/Brace">])</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">affectedProperties</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">&gt;</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptComment">// This tween has some properties that need to be affected
</span>                            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">objectProperties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">AuxFunctions</span>.<span class="ActionScriptDefault_Text">getObjectLength</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">objectProperties</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">affectedProperties</span>.<span class="ActionScriptDefault_Text">length</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptComment">// The list of properties is the same as all properties, so affect it all
</span>                                <span class="ActionScriptDefault_Text">p_affectFunction</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptDefault_Text">affected</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptComment">// The properties are mixed, so split the tween and affect only certain specific properties
</span>                                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">slicedTweenIndex</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">splitTweens</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span>, <span class="ActionScriptDefault_Text">affectedProperties</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptDefault_Text">p_affectFunction</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">slicedTweenIndex</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptDefault_Text">affected</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptBracket/Brace">}</span>
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">affected</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Splits a tweening in two
         *
         * @param        p_tween                Number        Object that must have its tweens split
         * @param        p_properties        Array        Array of strings containing the list of properties that must be separated
         * @return                            Number        The index number of the new tween
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">splitTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptComment">// First, duplicates
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">originalTween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptBracket/Brace">]</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">newTween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">originalTween</span>.<span class="ActionScriptDefault_Text">clone</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">false</span><span class="ActionScriptBracket/Brace">)</span>;

            <span class="ActionScriptComment">// Now, removes tweenings where needed
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>;

            <span class="ActionScriptComment">// Removes the specified properties from the old one
</span>            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">p_properties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>;
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">originalTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]))</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">originalTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">undefined</span>;
                    <span class="ActionScriptReserved">delete</span> <span class="ActionScriptDefault_Text">originalTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptComment">// Removes the unspecified properties from the new one
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">found</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">newTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">found</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">p_properties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">found</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                        <span class="ActionScriptReserved">break</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">found</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">newTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">undefined</span>;
                    <span class="ActionScriptReserved">delete</span> <span class="ActionScriptDefault_Text">newTween</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptComment">// If there are empty property lists, a cleanup is done on the next updateTweens() cycle
</span>            <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">newTween</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">-</span> 1<span class="ActionScriptBracket/Brace">)</span>;
            
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptComment">// ==================================================================================================================================
</span>        <span class="ActionScriptComment">// ENGINE functions -----------------------------------------------------------------------------------------------------------------
</span>    
        <span class="ActionScriptASDoc">/**
         * Updates all existing tweenings.
         *
         * @return                            Boolean        FALSE if no update was made because there&apos;s no tweening (even delayed ones)
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">updateTweens</span> <span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">==</span> 0<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">int</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Looping throught each Tweening and updating the values accordingly
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">undefined</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">isPaused</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">updateTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">removeTweenByIndex</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span>, <span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">--</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
    
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Remove a specific tweening from the tweening list.
         *
         * @param        p_tween                Number        Index of the tween to be removed on the tweenings list
         * @return                            Boolean        Whether or not it successfully removed this tweening
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">removeTweenByIndex</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>, <span class="ActionScriptDefault_Text">p_finalRemoval</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_finalRemoval</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">splice</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span>, 1<span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Pauses a specific tween.
         *
         * @param        p_tween                Number        Index of the tween to be paused
         * @return                            Boolean        Whether or not it successfully paused this tweening
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">pauseTweenByIndex</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tTweening</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptBracket/Brace">]</span>;    <span class="ActionScriptComment">// Shortcut to this tweening
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">isPaused</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timePaused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">isPaused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
    
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Resumes a specific tween.
         *
         * @param        p_tween                Number        Index of the tween to be resumed
         * @return                            Boolean        Whether or not it successfully resumed this tweening
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">resumeTweenByIndex</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tTweening</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_tween</span><span class="ActionScriptBracket/Brace">]</span>;    <span class="ActionScriptComment">// Shortcut to this tweening
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">isPaused</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timePaused</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timePaused</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timePaused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">undefined</span>;
            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">isPaused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
    
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Updates a specific tween.
         *
         * @param        i                    Number        Index (from the tween list) of the tween that should be updated
         * @return                            Boolean        FALSE if it&apos;s already finished and should be deleted, TRUE if otherwise
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">updateTweenByIndex</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tTweening</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">TweenListObj</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>;    <span class="ActionScriptComment">// Shortcut to this tweening
</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">scope</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;

            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">isOver</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;        <span class="ActionScriptComment">// Whether or not it&apos;s over the update time
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">mustUpdate</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span>;            <span class="ActionScriptComment">// Whether or not it should be updated (skipped if false)
</span>    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">nv</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                    <span class="ActionScriptComment">// New value for each property
</span>    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">t</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                    <span class="ActionScriptComment">// current time (frames, seconds)
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">b</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                    <span class="ActionScriptComment">// beginning value
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">c</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                    <span class="ActionScriptComment">// change in value
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">d</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;                     <span class="ActionScriptComment">// duration (frames, seconds)
</span>    
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>;                <span class="ActionScriptComment">// Property name, used in loops
</span>    
            <span class="ActionScriptComment">// Shortcut stuff for speed
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tScope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;                <span class="ActionScriptComment">// Current scope
</span>            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tProperty</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>;            <span class="ActionScriptComment">// Property being checked
</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Can already start
</span>    
                <span class="ActionScriptDefault_Text">tScope</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">scope</span>;
    
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">isCaller</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// It&apos;s a &apos;caller&apos; tween
</span>                    <span class="ActionScriptReserved">do</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">t</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">/</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">count</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">*</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timesCalled</span><span class="ActionScriptOperator">+</span>1<span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptDefault_Text">b</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                        <span class="ActionScriptDefault_Text">c</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                        <span class="ActionScriptDefault_Text">d</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                        <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">transition</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">t</span>, <span class="ActionScriptDefault_Text">b</span>, <span class="ActionScriptDefault_Text">c</span>, <span class="ActionScriptDefault_Text">d</span><span class="ActionScriptBracket/Brace">)</span>;
    
                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">nv</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdate</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptReserved">try</span> <span class="ActionScriptBracket/Brace">{</span>
                                    <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdate</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">catch</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                    <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>, <span class="ActionScriptDefault_Text">e</span>, <span class="ActionScriptString">&quot;onUpdate&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptBracket/Brace">}</span>
                            <span class="ActionScriptBracket/Brace">}</span>

                            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timesCalled</span><span class="ActionScriptOperator">++</span>;
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timesCalled</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">count</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">isOver</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                                <span class="ActionScriptReserved">break</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">waitFrames</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">break</span>;
                        <span class="ActionScriptBracket/Brace">}</span>
    
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">while</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">nv</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// It&apos;s a normal transition tween
</span>
                    <span class="ActionScriptDefault_Text">mustUpdate</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">skipUpdates</span> <span class="ActionScriptOperator">&lt;</span> 1 <span class="ActionScriptOperator">||</span> <span class="ActionScriptOperator">!</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">skipUpdates</span> <span class="ActionScriptOperator">||</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">updatesSkipped</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">skipUpdates</span>;

                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">&gt;=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">isOver</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                        <span class="ActionScriptDefault_Text">mustUpdate</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                    <span class="ActionScriptBracket/Brace">}</span>

                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">hasStarted</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptComment">// First update, read all default values (for proper filter tweening)
</span>                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onStart</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptReserved">try</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onStart</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onStartParams</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">catch</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>, <span class="ActionScriptDefault_Text">e</span>, <span class="ActionScriptString">&quot;onStart&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">pv</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getPropertyValue</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">valueStart</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pv</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">?</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">valueComplete</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">pv</span>;
                        <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptDefault_Text">mustUpdate</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                        <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">hasStarted</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                    <span class="ActionScriptBracket/Brace">}</span>

                    <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">mustUpdate</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptDefault_Text">tProperty</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">]</span>;

                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isOver</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptComment">// Tweening time has finished, just set it to the final value
</span>                                <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueComplete</span>;
                            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">hasModifier</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                    <span class="ActionScriptComment">// Modified
</span>                                    <span class="ActionScriptDefault_Text">t</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                                    <span class="ActionScriptDefault_Text">d</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                                    <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">transition</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">t</span>, 0, 1, <span class="ActionScriptDefault_Text">d</span><span class="ActionScriptBracket/Brace">)</span>;
                                    <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">modifierFunction</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueStart</span>, <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueComplete</span>, <span class="ActionScriptDefault_Text">nv</span>, <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">modifierParameters</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                                    <span class="ActionScriptComment">// Normal update
</span>                                    <span class="ActionScriptDefault_Text">t</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                                    <span class="ActionScriptDefault_Text">b</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueStart</span>;
                                    <span class="ActionScriptDefault_Text">c</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tProperty</span>.<span class="ActionScriptDefault_Text">valueStart</span>;
                                    <span class="ActionScriptDefault_Text">d</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">timeStart</span>;
                                    <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">transition</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">t</span>, <span class="ActionScriptDefault_Text">b</span>, <span class="ActionScriptDefault_Text">c</span>, <span class="ActionScriptDefault_Text">d</span><span class="ActionScriptBracket/Brace">)</span>;
                                <span class="ActionScriptBracket/Brace">}</span>
                            <span class="ActionScriptBracket/Brace">}</span>

                            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">rounded</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">nv</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Math</span>.<span class="ActionScriptDefault_Text">round</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">nv</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptDefault_Text">setPropertyValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">pName</span>, <span class="ActionScriptDefault_Text">nv</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptBracket/Brace">}</span>

                        <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">updatesSkipped</span> <span class="ActionScriptOperator">=</span> 0;

                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdate</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                            <span class="ActionScriptReserved">try</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdate</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onUpdateParams</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">catch</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                                <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>, <span class="ActionScriptDefault_Text">e</span>, <span class="ActionScriptString">&quot;onUpdate&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                            <span class="ActionScriptBracket/Brace">}</span>
                        <span class="ActionScriptBracket/Brace">}</span>
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">updatesSkipped</span><span class="ActionScriptOperator">++</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
    
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isOver</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onComplete</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">try</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onComplete</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tScope</span>, <span class="ActionScriptDefault_Text">tTweening</span>.<span class="ActionScriptDefault_Text">onCompleteParams</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">catch</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">tTweening</span>, <span class="ActionScriptDefault_Text">e</span>, <span class="ActionScriptString">&quot;onComplete&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>

                <span class="ActionScriptReserved">return</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">isOver</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
    
            <span class="ActionScriptComment">// On delay, hasn&apos;t started, so returns true
</span>            <span class="ActionScriptReserved">return</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">true</span><span class="ActionScriptBracket/Brace">)</span>;
    
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Initiates the Tweener--should only be ran once.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_object</span><span class="ActionScriptOperator">:*</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">_inited</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;

            <span class="ActionScriptComment">// Registers all default equations
</span>            <span class="ActionScriptDefault_Text">_transitionList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">Equations</span>.<span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;

            <span class="ActionScriptComment">// Registers all default special properties
</span>            <span class="ActionScriptDefault_Text">_specialPropertyList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">_specialPropertyModifierList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">_specialPropertySplitterList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">SpecialPropertiesDefault</span>.<span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Adds a new function to the available transition list &quot;shortcuts&quot;.
         *
         * @param        p_name                String        Shorthand transition name
         * @param        p_function            Function    The proper equation function
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">registerTransition</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">p_function</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">_transitionList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_function</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Adds a new special property to the available special property list.
         *
         * @param        p_name                Name of the &quot;special&quot; property.
         * @param        p_getFunction        Function that gets the value.
         * @param        p_setFunction        Function that sets the value.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">registerSpecialProperty</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">p_getFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>, <span class="ActionScriptDefault_Text">p_setFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>, <span class="ActionScriptDefault_Text">p_parameters</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">sp</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">SpecialProperty</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">SpecialProperty</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_getFunction</span>, <span class="ActionScriptDefault_Text">p_setFunction</span>, <span class="ActionScriptDefault_Text">p_parameters</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">sp</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Adds a new special property modifier to the available modifier list.
         *
         * @param        p_name                Name of the &quot;special&quot; property modifier.
         * @param        p_modifyFunction    Function that modifies the value.
         * @param        p_getFunction        Function that gets the value.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">registerSpecialPropertyModifier</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">p_modifyFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>, <span class="ActionScriptDefault_Text">p_getFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">spm</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">SpecialPropertyModifier</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">SpecialPropertyModifier</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_modifyFunction</span>, <span class="ActionScriptDefault_Text">p_getFunction</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptDefault_Text">_specialPropertyModifierList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">spm</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Adds a new special property splitter to the available splitter list.
         *
         * @param        p_name                Name of the &quot;special&quot; property splitter.
         * @param        p_splitFunction        Function that splits the value.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">registerSpecialPropertySplitter</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">p_splitFunction</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Function</span>, <span class="ActionScriptDefault_Text">p_parameters</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">_inited</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">sps</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">SpecialPropertySplitter</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">SpecialPropertySplitter</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_splitFunction</span>, <span class="ActionScriptDefault_Text">p_parameters</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptDefault_Text">_specialPropertySplitterList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_name</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">sps</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Starts the Tweener class engine. It is supposed to be running every time a tween exists.
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">startEngine</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">_engineExists</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
            <span class="ActionScriptDefault_Text">_tweenList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
            
            <span class="ActionScriptDefault_Text">__tweener_controller__</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">MovieClip</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptDefault_Text">__tweener_controller__</span>.<span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Event</span>.<span class="ActionScriptDefault_Text">ENTER_FRAME</span>, <span class="ActionScriptDefault_Text">Tweener</span>.<span class="ActionScriptDefault_Text">onEnterFrame</span><span class="ActionScriptBracket/Brace">)</span>;
            
            <span class="ActionScriptDefault_Text">updateTime</span><span class="ActionScriptBracket/Brace">()</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Stops the Tweener class engine.
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">stopEngine</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">_engineExists</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptDefault_Text">_tweenList</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>;
            <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">=</span> 0;
            <span class="ActionScriptDefault_Text">__tweener_controller__</span>.<span class="ActionScriptDefault_Text">removeEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Event</span>.<span class="ActionScriptDefault_Text">ENTER_FRAME</span>, <span class="ActionScriptDefault_Text">Tweener</span>.<span class="ActionScriptDefault_Text">onEnterFrame</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptDefault_Text">__tweener_controller__</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Gets a property value from an object.
         *
         * @param        p_obj                Object        Any given object
         * @param        p_prop                String        The property name
         * @return                            Number        The value
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">getPropertyValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Special property
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Uses additional parameters
</span>                    <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">getValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>, <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Doesn&apos;t use additional parameters
</span>                    <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">getValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Regular property
</span>                <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>;
            <span class="ActionScriptBracket/Brace">}</span>
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Sets the value of an object property.
         *
         * @param        p_obj                Object        Any given object
         * @param        p_prop                String        The property name
         * @param        p_value                Number        The new value
         */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">setPropertyValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span>, <span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>, <span class="ActionScriptDefault_Text">p_value</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Special property
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Uses additional parameters
</span>                    <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">setValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>, <span class="ActionScriptDefault_Text">p_value</span>, <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">parameters</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Doesn&apos;t use additional parameters
</span>                    <span class="ActionScriptDefault_Text">_specialPropertyList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">setValue</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_obj</span>, <span class="ActionScriptDefault_Text">p_value</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// Regular property
</span>                <span class="ActionScriptDefault_Text">p_obj</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">p_prop</span><span class="ActionScriptBracket/Brace">]</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_value</span>;
            <span class="ActionScriptBracket/Brace">}</span>
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Updates the time to enforce time grid-based updates.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">updateTime</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">getTimer</span><span class="ActionScriptBracket/Brace">()</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Ran once every frame. It&apos;s the main engine; updates all existing tweenings.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onEnterFrame</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">e</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Event</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">updateTime</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">hasUpdated</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptDefault_Text">hasUpdated</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">updateTweens</span><span class="ActionScriptBracket/Brace">()</span>;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">hasUpdated</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">stopEngine</span><span class="ActionScriptBracket/Brace">()</span>;    <span class="ActionScriptComment">// There&apos;s no tweening to update or wait, so it&apos;s better to stop the engine
</span>        <span class="ActionScriptBracket/Brace">}</span>
    
        <span class="ActionScriptASDoc">/**
         * Sets the new time scale.
         *
         * @param        p_time                Number        New time scale (0.5 = slow, 1 = normal, 2 = 2x fast forward, etc)
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">setTimeScale</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_time</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span>;
    
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">isNaN</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_time</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptDefault_Text">p_time</span> <span class="ActionScriptOperator">=</span> 1;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_time</span> <span class="ActionScriptOperator">&lt;</span> 0.00001<span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">p_time</span> <span class="ActionScriptOperator">=</span> 0.00001;
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_time</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptDefault_Text">_timeScale</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptComment">// Multiplies all existing tween times accordingly
</span>                    <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                        <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeStart</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeStart</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">*</span> <span class="ActionScriptDefault_Text">_timeScale</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">p_time</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeComplete</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timeComplete</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">*</span> <span class="ActionScriptDefault_Text">_timeScale</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">p_time</span><span class="ActionScriptBracket/Brace">)</span>;
                        <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timePaused</span> <span class="ActionScriptOperator">!=</span> <span class="ActionScriptReserved">undefined</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timePaused</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptBracket/Brace">((</span><span class="ActionScriptDefault_Text">_currentTime</span> <span class="ActionScriptOperator">-</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">timePaused</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">*</span> <span class="ActionScriptDefault_Text">_timeScale</span> <span class="ActionScriptOperator">/</span> <span class="ActionScriptDefault_Text">p_time</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptComment">// Sets the new timescale value (for new tweenings)
</span>                <span class="ActionScriptDefault_Text">_timeScale</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">p_time</span>;
            <span class="ActionScriptBracket/Brace">}</span>
        <span class="ActionScriptBracket/Brace">}</span>


        <span class="ActionScriptComment">// ==================================================================================================================================
</span>        <span class="ActionScriptComment">// AUXILIARY functions --------------------------------------------------------------------------------------------------------------
</span>
        <span class="ActionScriptASDoc">/**
         * Finds whether or not an object has any tweening.
         *
         * @param        p_scope        Target object.
         * @return                    &lt;code&gt;true&lt;/code&gt; if there&apos;s a tweening occuring on this object (paused, delayed, or active), &lt;code&gt;false&lt;/code&gt; if otherwise.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">isTweening</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Boolean</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;

            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">true</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">false</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Returns an array containing a list of the properties being tweened for this object.
         *
         * @param        p_scope        Target object.
         * @return                    Total number of properties being tweened (including delayed or paused tweens).
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">getTweens</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptBracket/Brace">[]</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>;
             <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">tList</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;

            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptDefault_Text">tList</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pName</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">tList</span>;
        <span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptASDoc">/**
         * Returns the number of properties being tweened for a given object.
         *
         * @param        p_scope        Target object.
         * @return                    Total number of properties being tweened (including delayed or paused tweens).
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">getTweenCount</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">))</span> <span class="ActionScriptReserved">return</span> 0;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">c</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Number</span> <span class="ActionScriptOperator">=</span> 0;

            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">scope</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">p_scope</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">c</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptDefault_Text">AuxFunctions</span>.<span class="ActionScriptDefault_Text">getObjectLength</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">c</span>;
        <span class="ActionScriptBracket/Brace">}</span>


        <span class="ActionScriptComment">/* Handles errors when Tweener executes any callbacks (onStart, onUpdate, etc)
        *  If the TweenListObj specifies an &lt;code&gt;onError&lt;/code&gt; callback it well get called, passing the &lt;code&gt;Error&lt;/code&gt; object and the current scope as parameters. If no &lt;code&gt;onError&lt;/code&gt; callback is specified, it will trace a stackTrace.
        */</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">handleError</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pTweening</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">TweenListObj</span>, <span class="ActionScriptDefault_Text">pError</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">Error</span>, <span class="ActionScriptDefault_Text">pCallBackName</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptReserved">void</span><span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptComment">// do we have an error handler?
</span>            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">onError</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">onError</span> <span class="ActionScriptReserved">is</span> <span class="ActionScriptDefault_Text">Function</span><span class="ActionScriptBracket/Brace">)){</span>
                <span class="ActionScriptComment">// yup, there&apos;s a handler. Wrap this in a try catch in case the onError throws an error itself.
</span>                <span class="ActionScriptReserved">try</span><span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">onError</span>.<span class="ActionScriptDefault_Text">apply</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptDefault_Text">pError</span><span class="ActionScriptBracket/Brace">])</span>;
                <span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptReserved">catch</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">metaError</span> <span class="ActionScriptOperator">:</span> <span class="ActionScriptDefault_Text">Error</span><span class="ActionScriptBracket/Brace">){</span>
                    <span class="ActionScripttrace">trace</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&quot;## [Tweener] Error:&quot;</span>, <span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptString">&quot;raised an error while executing the &apos;onError&apos; handler. Original error:\n&quot;</span>, <span class="ActionScriptDefault_Text">pError</span>.<span class="ActionScriptDefault_Text">getStackTrace</span><span class="ActionScriptBracket/Brace">()</span> , <span class="ActionScriptString">&quot;\nonError error:&quot;</span>, <span class="ActionScriptDefault_Text">metaError</span>.<span class="ActionScriptDefault_Text">getStackTrace</span><span class="ActionScriptBracket/Brace">())</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span><span class="ActionScriptReserved">else</span><span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptComment">// o handler, simply trace the stack trace:
</span>                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(!</span><span class="ActionScriptDefault_Text">Boolean</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">onError</span><span class="ActionScriptBracket/Brace">)){</span>
                    <span class="ActionScripttrace">trace</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&quot;## [Tweener] Error: :&quot;</span>, <span class="ActionScriptDefault_Text">pTweening</span>.<span class="ActionScriptDefault_Text">scope</span>, <span class="ActionScriptString">&quot;raised an error while executing the&apos;&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">pCallBackName</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot;&apos;handler. \n&quot;</span>, <span class="ActionScriptDefault_Text">pError</span>.<span class="ActionScriptDefault_Text">getStackTrace</span><span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
        <span class="ActionScriptBracket/Brace">}</span>


        <span class="ActionScriptASDoc">/**
         * Returns the current tweener version.
         * @return                    The identification string of the current Tweener version, composed of an identification of the platform version (&quot;AS2&quot;, &quot;AS2_FL7&quot;, or &quot;AS3&quot;) followed by space and then the version number.
         * @example The following code returns the current used version of Tweener:
         * &lt;listing version=&quot;3.0&quot;&gt;
         * import caurina.transitions.Tweener;
         *
         * var tVersion:String = Tweener.getVersion();
         * trace (&quot;Using Tweener version &quot; + tVersion + &quot;.&quot;); // Outputs: &quot;Using Tweener version AS3 1.24.47.&quot;&lt;/listing&gt;
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">getVersion</span> <span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptString">&quot;AS3 1.26.62&quot;</span>;
        <span class="ActionScriptBracket/Brace">}</span>


        <span class="ActionScriptComment">// ==================================================================================================================================
</span>        <span class="ActionScriptComment">// DEBUG functions ------------------------------------------------------------------------------------------------------------------
</span>
        <span class="ActionScriptASDoc">/**
         * Lists all existing tweenings.
         *
         * @return                    A string containing the list of all tweenings that currently exist inside the engine.
         */</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptReserved">static</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">debug_getList</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">ttl</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;&quot;</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>, <span class="ActionScriptDefault_Text">k</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">uint</span>;
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">ttl</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptString">&quot;[&quot;</span><span class="ActionScriptOperator">+</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">+</span><span class="ActionScriptString">&quot;] ::\n&quot;</span>;
                <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">k</span> <span class="ActionScriptOperator">=</span> 0; <span class="ActionScriptDefault_Text">k</span><span class="ActionScriptOperator">&lt;</span><span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">k</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">ttl</span> <span class="ActionScriptOperator">+=</span> <span class="ActionScriptString">&quot;  &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">k</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">name</span> <span class="ActionScriptOperator">+</span><span class="ActionScriptString">&quot; -&gt; &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">_tweenList</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">properties</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">k</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">valueComplete</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot;\n&quot;</span>;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">ttl</span>;
        <span class="ActionScriptBracket/Brace">}</span>

    <span class="ActionScriptBracket/Brace">}</span>
<span class="ActionScriptBracket/Brace">}</span>
</pre></body>
</html>
